home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1984 September / 1984-09.d64 / mystery manor_64 (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  9KB  |  250 lines

  1. 3 rem  murder at mystery manor
  2. 9 poke53280,1:poke53281,0:s=54272:forj=0to24:pokes+j,0:next:pokes+24,15
  3. 12 print"[147]"tab(7)"[155][223][169]"
  4. 13 printtab(7)" [223][169] ":printtab(7)"  [223][169]  [146] ystery"
  5. 15 printtab(7)" [194]  [194] ":printtab(7)" [194]  [194] ":print"[145][145][145]"tab(21)chr$(142);
  6. 24 gosub1713:print"at"
  7. 27 print""tab(12)"[152][223][169]":printtab(12)" [223][169] "
  8. 28 printtab(12)"  [223][169]  [146] arple"
  9. 30 printtab(12)" [194]  [194] ":printtab(12)" [194]  [194] "
  10. 33 print"[145]"tab(17)"[151][223][169]":printtab(17)" [223][169] ":printtab(17)"  [223][169]  [146] anor"
  11. 36 printtab(17)" [194]  [194] ":printtab(17)" [194]  [194] "
  12. 39 gosub1713
  13. 42 forj=1to1000:next
  14. 45 pokes+5,15:pokes+6,0:pokes+4,129
  15. 50 j=1:fori=1to15:poke53281,j:poke53280,1-j
  16. 51 pokes+1,int(rnd(1)*60)+5
  17. 53 j=1-j:forp=1to30:next:next
  18. 56 pokes+4,0
  19. 100 deffnr(x)=int(rnd(1)*x)+1:j=rnd(-ti)
  20. 103 dimp%(50),s$(22),r$(14),c$(6),v$(3),v(3),d%(10,2)
  21. 112 forj=1to10:p%(j)=fnr(11)+3:next
  22. 115 forj=11to22:p%(j)=fnr(13)+1:next
  23. 118 forj=24to31:p%(j)=4:next
  24. 121 p%(23)=fnr(8)+6
  25. 124 j=fnr(10):p%(35)=j:p%(34)=p%(j):p%(j)=0
  26. 127 j=fnr(10):ifp%(j)=0then127
  27. 130 p%(32)=j:p%(j)=0:j=fnr(12):p%(33)=j:p%(j+10)=0
  28. 133 forj=1to22:ifrnd(1)<=.75thenp%(j)=-p%(j)
  29. 136 reads$(j):next
  30. 139 forj=1to14:readr$(j):next
  31. 142 forj=0to10:readd%(j,1),d%(j,2):ifrnd(1)<.9thend%(j,0)=-1
  32. 143 next
  33. 145 forj=0to3:readv$(j):next
  34. 148 p=2049:i=0:forj=4000to7000step1000
  35. 151 ifj=peek(p+2)+peek(p+3)*256thenda(i)=p:i=i+1:goto157
  36. 154 p=peek(p)+peek(p+1)*256:goto151
  37. 157 next
  38. 172 print"[144]      how many players (1-6) ?"
  39. 175 geta$:ifa$<"1"ora$>"6"then175
  40. 178 i=val(a$):p%(49)=i
  41. 181 forj=1toi:p%(35+j)=1:next
  42. 190 print"[147][151][193]ll players except [208]layer #1 must leave"chr$(14)
  43. 192 print"the room at this point.":print"   [208]layer # 1: [208]ress  [210][197][212][213][210][206] [146]"
  44. 193 print"       to begin the game!"
  45. 194 geta$:ifa$<>chr$(13)then194
  46. 196 poke53280,12:poke53281,15:q=1
  47. 200 print"[147][144][208][204][193][217][197][210] #"q"---------------[151]"
  48. 203 ifc$(q)<>""then212
  49. 206 print"[208]ress any two keys to establish your"
  50. 207 print"[211]ecret [195]ode. [215]ith this code, no other"
  51. 209 print"player can steal your turn!":print"[197]nter your code now!"
  52. 210 gosub1700:c$(q)=a$:goto218
  53. 212 print"[197]nter your [211]ecret [195]ode!":gosub1700
  54. 215 ifc$(q)<>a$theni=0:gosub1710:goto200
  55. 218 print"[147][144][208][204][193][217][197][210] #"q"---------------[151]"
  56. 221 r=p%(35+q):print"[217]ou are in the "r$(r)"."
  57. 224 print"[196]o you wish to leave this room [[217]/[206]] ?"
  58. 227 geta$:ifa$="n"thenprint"[206]o":goto330
  59. 230 ifa$<>"y"then227
  60. 233 i=1:j=r:gosub1730:forj=0to3:readv(j):next
  61. 236 print"[217]es":print"[196]oors from this room are found to the:"
  62. 239 forj=0to3:ifv(j)<>0thenprinttab(4);v$(j)
  63. 242 next:print"[212]ype [144] [206] [146] ,  [211] [146] ,  [197] [146] ,[151]or [144] [215] [146][151] to move!":i=3
  64. 245 geta$:ifa$=""then245
  65. 248 a=asc(a$)or128:i=0:ifa<197ora>215then245
  66. 251 ifa=asc(v$(i))then260
  67. 254 i=i+1:ifi<4then251
  68. 257 goto245
  69. 260 print"[199]o "v$(i)
  70. 261 if v(i)<1thenprint"[206]o door this way. [217]ou can't move.":goto1910
  71. 263 ifv(i)<100thenr=v(i):print"[205]oving to new room.":fori=1to1000:next:goto330
  72. 266 z=v(i)-100:ifd%(z,0)=0then300
  73. 269 print"[212]hat door is locked":gosub1760
  74. 270 ifa=0thenprint"[217]ou don't have a matching key.":print"[206]o move.":goto1910
  75. 272 print"[217]our key opens the door.":gosub1770:print"[205]oving to new room."
  76. 300 i=d%(z,1):ifi=rtheni=d%(z,2)
  77. 303 r=i:gosub1760:ifa<>1then330
  78. 306 print"[196]o you want to lock this door behind    you  [[217] / [206]] ?"
  79. 309 geta$:ifa$="n"thenprint"[206]o":goto330
  80. 312 ifa$<>"y"then309
  81. 315 print"[217]es":gosub1770:print"[196]oor locked."
  82. 330 p%(q+35)=r:print"[147][217]ou are in the "r$(r)"."
  83. 333 print"[217]ou carry ";:i=p%(q+41):gosub1780:print"."
  84. 336 j=0:print"[217]ou see the following here:"
  85. 339 fori=1to31:ifp%(i)=rthenj=j+1:print"   ";:gosub1780:print"."
  86. 342 next:fori=1to6:ifi<>qandp%(35+i)=rthenprint"   [208]layer #"i".":j=j+1
  87. 345 next:ifp%(34)=rthenprint"   the body of the "s$(p%(35))".":j=j+1
  88. 348 ifj=0thenprint"[206]othing of interest."
  89. 351 print"[208]ress [144] [210][197][212][213][210][206][160][146][151] for options...."
  90. 354 geta$:ifa$<>chr$(13)then354
  91. 375 print"[147]"
  92. 376 print"[144]   >>>>> [212][213][210][206][160][207][208][212][201][207][206][211] <<<<<":print" [151][193][146] [193]ccuse the [205]urderer!"
  93. 377 print"[160][196][146] [196]rop an item.":print" [200][146] [200]ide an item or suspect."
  94. 379 print" [206][146] [206]o action.":print" [208][146] [208]ilfer from another player."
  95. 381 print" [211][146] [211]earch the room for hidden items.":print" [212][146] [212]ake an item."
  96. 384 print"[197]nter letter for action desired!"
  97. 387 geta$:ifa$<"a"ora$>"t"then387
  98. 390 print"[147]":a=asc(a$):ona-64goto700,387,387,800
  99. 393 ifa$="h"then970
  100. 396 ifa$<"n"then387
  101. 400 ona-77goto450,387,880,398,387,930,820
  102. 450 print"[208]ress [144] [210][197][212][213][210][206] [146][151] to end your turn!"
  103. 453 geta$:ifa$<>chr$(13)then453
  104. 456 i=0:print"[144][147][208][204][193][217][197][210] #"q"=========== [197]nd [212]urn":gosub1710
  105. 459 q=q+1:ifq>p%(49)thenq=1
  106. 462 ifp%(q+35)=0then459
  107. 465 goto200
  108. 700 print"[147][144]   ***** [205][193][203][197] [193][206] [193][195][195][213][211][193][212][201][207][206] *****[151]":i=1
  109. 703 forj=1to10:printj"[157]:"tab(5)"[212]he ";s$(j)".":next
  110. 706 print"[197]nter number of [205]urder [214]ictim ";:inputj
  111. 709 ifj<>p%(35)theni=0
  112. 712 gosub1900
  113. 715 forj=1to10:printj"[157]:"tab(5)"[212]he ";s$(j)".":next
  114. 718 print"[197]nter number of [205]urderer ";:inputj
  115. 721 ifj<>p%(32)theni=0
  116. 724 gosub1900
  117. 727 forj=1to12:printj"[157]:"tab(5)"[212]he "s$(j+10)".":next
  118. 730 print"[197]nter number of [205]urder [215]eapon ";:inputj
  119. 733 ifj<>p%(33)theni=0
  120. 736 gosub1900
  121. 739 forj=1to14:printj"[157]:"tab(5)"[212]he "r$(j)".":next
  122. 742 print"[197]nter number of [205]urder [210]oom ";:inputj
  123. 745 ifj<>abs(p%(34))theni=0
  124. 746 print"[147][211]ummoning the [208]olice to make an":print"arrest......"
  125. 748 pokes+14,5:pokes+18,16:pokes+3,1:pokes+24,143:pokes+6,240:pokes+4,65:a=5389
  126. 751 forj=1to200:r=a+peek(s+27)*3.5:pokes,rand255:pokes+1,int(r/256):next
  127. 754 forj=0to24:pokes+j,0:next:pokes+24,15
  128. 757 forj=1to2500:next
  129. 760 ifi=0then772
  130. 763 i=3:print"[217]our solution is correct!":gosub1710
  131. 769 print"[208]layer #"q"has cracked the case!":goto787
  132. 772 i=2:print"[206]o!...[212]hat was a false arrest!":gosub1710
  133. 775 gosub1800:p%(35+q)=0:p%(50)=p%(50)+1:print"[217]ou're out of the game!"
  134. 778 ifp%(50)<p%(49)then450
  135. 781 restore:gosub1713:forj=1to500:next:gosub1713
  136. 784 print"[193]ll players have given incorrect":print"solutions to the crime!!"
  137. 785 print"[206]obody wins !"
  138. 787 print"[200]ere is the correct solution:":print"[212]he "s$(p%(32))
  139. 789 print"killed the "s$(p%(35)):print"in the "r$(abs(p%(34)))","
  140. 791 print"using the "s$(p%(33)+10)".":end
  141. 800 print"[144]   *** [196][210][207][208] [193][206] [201][212][197][205] ***[151]":gosub1800
  142. 803 ifi=0thenprint"[217]ou weren't carrying anything !":goto450
  143. 806 print"[217]ou drop ";:gosub1780:print".":goto450
  144. 820 print"[144]   *** [212][193][203][197] [193][206] [201][212][197][205] ***[151]":j=1:print"[212]hese items are available:"
  145. 823 fori=11to31:ifp%(i)<>rthen829
  146. 826 printj": ";:gosub1780:print".":poke900+j,i:j=j+1
  147. 829 next:ifj=1thenprint"[206]o items.":goto450
  148. 832 print"[197]nter number to take an item, or":print"enter zero to take nothing."
  149. 835 input"[215]hat item do you want";a:ifa<0ora>=jthen835
  150. 838 ifa=0thenprint"[206]o item taken.":goto450
  151. 841 gosub1800:ifi<>0thenprint"[217]ou drop ";:gosub1780:print"."
  152. 844 i=peek(900+a):p%(i)=100+q:p%(q+41)=i
  153. 845 print"[217]ou take ";:gosub1780:print".":goto450
  154. 880 print"[144]   *** [208][201][204][198][197][210] [198][210][207][205] [193][206][207][212][200][197][210] ***[151]":j=0
  155. 881 print"[212]hese players are also in the room..."
  156. 883 fori=1to6:ifp%(35+i)=randi<>qthenprint"   [208]layer #"i".":j=j+1
  157. 886 next:ifj=0thenprint"[206]o other players are in the room!":goto450
  158. 889 print"[215]hich player will you steal fro